﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using MsTestUtilities.SolutionAnalysis;
using System.Xml.Linq;

namespace SolutionAnalysisTests.ItemTests
{
    [TestClass]
    public class SelfClosingElementTests
    {
        private string _itemGroupXml = @"<content Include=""Something.cs"" />";
        private Item _item;

        [TestInitialize]
        public void Setup()
        {
            var xml = XElement.Parse(_itemGroupXml);
            _item = new Item(xml);
        }


        [TestMethod]
        public void ItemName()
        {
            Assert.AreEqual("content", _item.Name);
        }

        [TestMethod]
        public void IncludeAttribute()
        {
            Assert.AreEqual("Something.cs", _item.Include);
        }
    }
}
